package rs.dalao.syc.index.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import rs.dalao.syc.common.response.JsonResult;
import rs.dalao.syc.index.pojo.vo.EncContentSearchVO;
import rs.dalao.syc.index.service.IEncContentSearchService;

import java.util.List;

@RestController
@RequestMapping("/search/")
@Api(tags = "6.高级搜索")

public class EncContentSearchController {
    @Autowired
    private IEncContentSearchService encContentSearchService;

    //实现多条件的高级搜索
    @GetMapping("query")
    @ApiOperation("多条件高级搜索")
    public JsonResult customQuery(String title){
        encContentSearchService.saveAll();
        List<EncContentSearchVO> encContentSearchVOS = encContentSearchService.customQuery(title);

        return JsonResult.ok(encContentSearchVOS);
    }
}
